package com.jk.service.impl;

import com.github.pagehelper.PageHelper;
import com.jk.bean.ChongZhi;
import com.jk.bean.Page;
import com.jk.bean.SendPage;
import com.jk.mapper.ChongZhiMapper;
import com.jk.service.ChongZhiService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @Description: 骚骚的🐏
 * @Author: 杨
 * @Date: 2019/3/20 14:08
 */
@Service
public class ChongZhiServiceImpl implements ChongZhiService {
     @Resource
    private ChongZhiMapper chongZhiMapper;

    @Override
    public SendPage queryVipChongZhi(ChongZhi chongzhi, Page pag) {
        List<ChongZhi> ll=chongZhiMapper.queryVipChongZhi(chongzhi);
        PageHelper.startPage(pag.getPage(),pag.getRows());
        List<ChongZhi> aa=chongZhiMapper.queryVipChongZhi(chongzhi);
        SendPage sendPage = new SendPage(ll.size(), aa);
        return sendPage;
    }
    @Override
    public SendPage queryJiFenChongZhi(ChongZhi chongZhi, Page pag) {
        List<ChongZhi> ll=chongZhiMapper.queryJiFenChongZhi(chongZhi);
        PageHelper.startPage(pag.getPage(),pag.getRows());
        List<ChongZhi> aa=chongZhiMapper.queryJiFenChongZhi(chongZhi);
        SendPage sendPage = new SendPage(ll.size(), aa);
        return sendPage;
    }
}
